<template>
  <div class="app-container">
    <DetailPage ref="detailPage" :model-name="modelName" @change="flashData">
      <template slot="after" slot-scope="scope">
        <div>-----------</div>
        <div>销售票据</div>
        <div>
          {{ scope.detailData.reconciled_invoice_ids__names }}
        </div>
      </template>
    </DetailPage>
  </div>
</template>

<script>
import odoo from '@/odooapi'

import DetailPage from '@/selfComponents/DetailPage'

const modelName = 'Test/AccountPaymentInDetail'
// const childFieldName = ['invoice_line_ids']

export default {
  name: 'Home',
  components: { DetailPage },
  directives: {},
  filters: {},

  data() {
    return {
      debug: odoo.debug,
      modelName: modelName
      // detailData: {}
    }
  },

  computed: {},

  async created() {},

  methods: {
    async flashData(record) {
      // console.log('xxxxxx,flashData', record)
      // this.detailData = { ...record }
      // const ret = await odoo
      //   .env(this.modelName)
      //   .call('open_payment_matching_screen', [record.id])
      // console.log('xxxxxx,flashData,2', ret)
    }
  }
}
</script>
